//
//  BilingHeadView.m
//  WWXELuShang
//
//  Created by 王涛 on 15/12/19.
//  Copyright © 2015年 lanou. All rights reserved.
//

#import "BilingHeadView.h"

@implementation BilingHeadView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] initWithFrame:(CGRectMake(0, 0, kWidth, kHeight / 3.5))];
        //    image.image = [UIImage imageNamed: @"240441-130H30KT484.jpg"];
        self.imageView.backgroundColor = kBarColor;
        [self addSubview:self.imageView];
        
        self.buttonView = [[UIImageView alloc] initWithFrame:CGRectMake(kWidth / 2 - kHeight / 13, kHeight / 3.5  - kHeight / 13, kHeight / 13 * 2, kHeight / 13 * 2)];
        self.buttonView.backgroundColor = [UIColor whiteColor];
        self.buttonView.image = [UIImage imageNamed:@"button3.png"];
        self.buttonView.layer.masksToBounds = YES;
        self.buttonView.layer.cornerRadius = kHeight / 13;
        self.buttonView.layer.borderWidth = 3;
        self.buttonView.layer.borderColor = [kBackGroundColor CGColor];
        self.buttonView.userInteractionEnabled = YES;//用户交互打开
        [self addSubview:self.buttonView];
        
        self.dateLabel = [[UILabel alloc] initWithFrame:(CGRectMake(kWidth / 10, kHeight / 3.3, kWidth / 5, kHeight / 10 / 3))];
        self.dateLabel.text = @"日期";
        self.dateLabel.textAlignment = NSTextAlignmentCenter;
        self.dateLabel.font = [UIFont boldSystemFontOfSize:15];
        self.dateLabel.textColor = [UIColor lightGrayColor];
        [self addSubview:self.dateLabel];
        
        self.cornLabel = [[UILabel alloc] initWithFrame:(CGRectMake(kWidth - kWidth / 20 - kWidth / 3, kHeight / 3.3, kWidth / 3, kHeight / 30))];
        self.cornLabel.text = @"总支出 :";
        self.cornLabel.font = [UIFont boldSystemFontOfSize:15];
        self.cornLabel.textAlignment = NSTextAlignmentRight;
        self.cornLabel.textColor = [UIColor lightGrayColor];
        [self addSubview:self.cornLabel];
        
        self.moneyLabel = [[UILabel alloc] initWithFrame:(CGRectMake(kWidth - kWidth / 20 - kWidth / 3, kHeight / 2.9 , kWidth / 3, kHeight / 30))];
        self.moneyLabel.textAlignment = NSTextAlignmentRight;
        self.moneyLabel.text = @"0.00";
        self.moneyLabel.textColor = [UIColor lightGrayColor];
        [self addSubview:self.moneyLabel];

    }
    return self;
}

@end
